---
layout: m1x_soap
title: Customer Info
---

<h2><a name="customer.info-Module%3AMageCustomer"></a>Module: Mage_Customer</h2>

<p>Allows you to export/import customers from/to Magento.</p>

<h3><a name="customer.info-Resource%3Acustomer"></a>Resource: customer</h3>


<h4><a name="customer.info-Method%3A"></a>Method:</h4>

<ul>
	<li>customer.info (SOAP V1)</li>
	<li>customerCustomerInfo (SOAP V2)</li>
</ul>



<p>Retrieve information about the specified customer.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> int </td>
<td> customerId </td>
<td> ID of the required customer </td>
</tr>
<tr>
<td> ArrayOfString </td>
<td> attributes </td>
<td> Array of attributes </td>
</tr>
</tbody></table>

<ul>
	<li>attributes (optional depending on the version) - only specified attributes will be returned. The customer_id value is always returned.</li>
</ul>


<p><b>Returns:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> customerInfo </td>
<td> Array of customerCustomerEntity </td>
</tr>
</tbody></table>


<p>The <b>customerCustomerEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> int </td>
<td> customer_id </td>
<td> ID of the customer </td>
</tr>
<tr>
<td> string </td>
<td> created_at </td>
<td> Date when the customer was created </td>
</tr>
<tr>
<td> string </td>
<td> updated_at </td>
<td> Date when the customer was updated </td>
</tr>
<tr>
<td> string </td>
<td> increment_id </td>
<td> Increment ID </td>
</tr>
<tr>
<td> int </td>
<td> store_id </td>
<td> Store ID </td>
</tr>
<tr>
<td> int </td>
<td> website_id </td>
<td> Website ID </td>
</tr>
<tr>
<td> string </td>
<td> created_in </td>
<td> Store view the customer was created in </td>
</tr>
<tr>
<td> string </td>
<td> email </td>
<td> Customer email </td>
</tr>
<tr>
<td> string </td>
<td> firstname </td>
<td> Customer first name </td>
</tr>
<tr>
<td> string </td>
<td> middlename </td>
<td> Customer middle name </td>
</tr>
<tr>
<td> string </td>
<td> lastname </td>
<td> Customer last name </td>
</tr>
<tr>
<td> int </td>
<td> group_id </td>
<td> Customer group ID </td>
</tr>
<tr>
<td> string </td>
<td> prefix </td>
<td> Customer prefix </td>
</tr>
<tr>
<td> string </td>
<td> suffix </td>
<td> Customer suffix </td>
</tr>
<tr>
<td> string </td>
<td> dob </td>
<td> Customer date of birth </td>
</tr>
<tr>
<td> string </td>
<td> taxvat </td>
<td> Tax/VAT number </td>
</tr>
<tr>
<td> boolean </td>
<td> confirmation </td>
<td> Confirmation flag </td>
</tr>
<tr>
<td> string </td>
<td> password_hash </td>
<td> Password hash </td>
</tr>
<tr>
<td> string </td>
<td> rp_token </td>
<td> Reset password token </td>
</tr>
<tr>
<td> string </td>
<td> rp_token_created_at </td>
<td> Date when the password was reset </td>
</tr>
</tbody></table>


<h4><a name="customer.info-Examples"></a>Examples</h4>

<h5><a name="customer.info-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'customer.info', '2');
var_dump($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>

<h5><a name="customer.info-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;customerCustomerInfo($sessionId, '2');
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="customer.info-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;customerCustomerInfo((object)array('sessionId' =&gt; $sessionId-&gt;result, 'customerId' =&gt; '2'));
var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<h5><a name="customer.info-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: java; gutter: false">array
  'customer_id' =&gt; string '2' (length=1)
  'created_at' =&gt; string '2012-03-29 12:37:23' (length=19)
  'updated_at' =&gt; string '2012-03-30 12:59:21' (length=19)
  'increment_id' =&gt; null
  'store_id' =&gt; string '2' (length=1)
  'website_id' =&gt; string '2' (length=1)
  'confirmation' =&gt; null
  'created_in' =&gt; string 'English' (length=7)
  'default_billing' =&gt; null
  'default_shipping' =&gt; string '2' (length=1)
  'disable_auto_group_change' =&gt; string '0' (length=1)
  'dob' =&gt; null
  'email' =&gt; string 'john@example.com' (length=16)
  'firstname' =&gt; string 'johny' (length=5)
  'gender' =&gt; null
  'group_id' =&gt; string '1' (length=1)
  'lastname' =&gt; string 'doe' (length=3)
  'middlename' =&gt; null
  'password_hash' =&gt; string 'cccfb3ecf54c9644a34106783148eff2:sp' (length=35)
  'prefix' =&gt; null
  'rp_token' =&gt; string '15433dd072f1f4e5aae83231b93f72d0' (length=32)
  'rp_token_created_at' =&gt; string '2012-03-30 15:10:31' (length=19)
  'suffix' =&gt; null
  'taxvat' =&gt; null</pre>
		</div>
</div></div>


